#if !defined(_IMI_CODECFFMPEG_API__H_INCLUDED_)
#define _IMI_CODECFFMPEG_API__H_INCLUDED_

#ifdef WIN32
#ifdef IMICODECFFMPEG_EXPORTS
#define CDEOCFFMPEG_LIB __declspec(dllexport)
#else
#define CDEOCFFMPEG_LIB __declspec(dllimport)
#endif

#ifndef CALL_METHOD
#define CALL_METHOD	__stdcall  //__cdecl
#endif
#else
#define CDEOCFFMPEG_LIB
#define CALL_METHOD
#endif

typedef int IMICodecFFmpegHandle;

extern "C"
{
	CDEOCFFMPEG_LIB int IMICodecFFmpeg_Init(IMICodecFFmpegHandle* pIMIhandle);

	CDEOCFFMPEG_LIB int IMICodecFFmpeg_SelectDecoder(IMICodecFFmpegHandle IMIhandle, int iCodecType, int iFlag);

	CDEOCFFMPEG_LIB int IMICodecFFmpeg_Fini(IMICodecFFmpegHandle IMIhandle);

	CDEOCFFMPEG_LIB int IMICodecFFmpeg_Decode(IMICodecFFmpegHandle IMIhandle, unsigned char* pData, int iDataLen, unsigned long long ullPTS);

	CDEOCFFMPEG_LIB int IMICodecFFmpeg_GetWidth(IMICodecFFmpegHandle IMIhandle);

	CDEOCFFMPEG_LIB int IMICodecFFmpeg_GetHeight(IMICodecFFmpegHandle IMIhandle);

	CDEOCFFMPEG_LIB int IMICodecFFmpeg_ToTexture(IMICodecFFmpegHandle IMIhandle, int iY, int iU, int iV);

	CDEOCFFMPEG_LIB int IMICodecFFmpeg_GetYUVData(IMICodecFFmpegHandle IMIhandle, unsigned char* pY, unsigned char* pU, unsigned char* pV);

	CDEOCFFMPEG_LIB int IMICodecFFmpeg_GetJpegData(IMICodecFFmpegHandle IMIhandle, unsigned char* pY, unsigned char* pU, unsigned char* pV, unsigned char* pBuffer, int width, int height, int quality);
}

#endif